<%@LANGUAGE="JAVASCRIPT" CODEPAGE="65001"%>
<!-- #include file = "core.asp" -->
<%
	function aa()
	{
		Response.Write(123);
	}
	var _system = $('database');
	Response.End();
	
	var _system = $('system');
	var _database = $('database');
	_database.path = "database/#database.mdb";
	var _list1 = _database.query('select top 4 [Id], [Title] from [Article] where [CategoryId] = 16 order by [Id] desc');
	//var _list1 = _database.query('[Id], [Title], [CategoryId]', '[Article]', '[CategoryId] = 16', '[Id] desc', 0, 1, 4, true);
	var _list2 = _database.query('select top 4 [Id], [Title] from [Article] where [CategoryId] = 17 order by [Id] desc');
	var _list3 = _database.query('select top 4 [Id], [Title] from [Article] where [CategoryId] = 18 order by [Id] desc');
	
	for (var _index in _list1) {
		_list1[_index].title = _list1[_index].title.length > 18 ? _list1[_index].title.substr(0, 18) + '...' : _list1[_index].title;
	}
	
	for (var _index in _list2) {
		_list2[_index].title = _list2[_index].title.length > 18 ? _list2[_index].title.substr(0, 18) + '...' : _list2[_index].title;
	}
	
	for (var _index in _list3) {
		_list3[_index].title = _list3[_index].title.length > 18 ? _list3[_index].title.substr(0, 18) + '...' : _list3[_index].title;
	}
	
	//var _info = _database.query('select [Content] from [Article] where [Title] = \'企业概况\'');

	var _data = {
		list1 : _list1,
		list2 : _list2,
		list3 : _list3//,
		//info : _info[0].content.replace(/<p>|<\/p>/g, '').substr(0, 140)
	}
	
	var _template = $('template');
	_system.write(_template.render(_data));
%>